package com.ruoyi.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取项目相关配置
 * 
 * @author ruoyi
 */
@Component
@ConfigurationProperties(prefix = "ruoyi")
public class RuoYiConfig
{
    /** 项目名称 */
    private String name;

    /** 版本 */
    private String version;

    /** 版权年份 */
    private String copyrightYear;

    /** 实例演示开关 */
    private boolean demoEnabled;

    /** 上传路径 */
    private static String profile;

    /** 获取地址开关 */
    private static boolean addressEnabled;

    /** 验证码类型 */
    private static String captchaType;


    private static String BILL_HTTP;
    private static String FILE_PATH;
    private static String FILE_WECHAT02600;
    private static String SIGN_PHOTO;
    private static String PHOTO_HTTP;
    private static String CARDAPPROVE;
    private static String CARD_PHOTO;
    private static String DATE_ACCOUNT;
    private static String GETIP_ACCOUNT;
    private static String GETPYTHON_ACCOUNT;
    private static String GET_ACCOUNT;
    private static String PRINT;
    private static String FILE_CABINET;
    private static String FILE_CABINET_HTTP;


    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getVersion()
    {
        return version;
    }

    public void setVersion(String version)
    {
        this.version = version;
    }

    public String getCopyrightYear()
    {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear)
    {
        this.copyrightYear = copyrightYear;
    }

    public boolean isDemoEnabled()
    {
        return demoEnabled;
    }

    public void setDemoEnabled(boolean demoEnabled)
    {
        this.demoEnabled = demoEnabled;
    }

    public static String getProfile()
    {
        return profile;
    }

    public void setProfile(String profile)
    {
        RuoYiConfig.profile = profile;
    }

    public static boolean isAddressEnabled()
    {
        return addressEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled)
    {
        RuoYiConfig.addressEnabled = addressEnabled;
    }

    public static String getCaptchaType() {
        return captchaType;
    }

    public void setCaptchaType(String captchaType) {
        RuoYiConfig.captchaType = captchaType;
    }

    /**
     * 获取导入上传路径
     */
    public static String getImportPath()
    {
        return getProfile() + "/import";
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath()
    {
        return getProfile() + "/avatar";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile() + "/upload";
    }





    public static String getBillHttp() {
        return BILL_HTTP;
    }

    public void setBillHttp(String billHttp) {
        RuoYiConfig.BILL_HTTP = billHttp;
    }

    public static String getFilePath() {
        return FILE_PATH;
    }

    public void setFilePath(String filePath) {
        RuoYiConfig.FILE_PATH = filePath;
    }

    public static String getFileWechat02600() {
        return FILE_WECHAT02600;
    }

    public void setFileWechat02600(String fileWechat02600) {
        RuoYiConfig.FILE_WECHAT02600 = fileWechat02600;
    }

    public static String getSignPhoto() {
        return SIGN_PHOTO;
    }

    public void setSignPhoto(String signPhoto) {
        RuoYiConfig.SIGN_PHOTO = signPhoto;
    }

    public static String getPhotoHttp() {
        return PHOTO_HTTP;
    }

    public void setPhotoHttp(String photoHttp) {
        RuoYiConfig.PHOTO_HTTP = photoHttp;
    }

    public static String getCARDAPPROVE() {
        return CARDAPPROVE;
    }

    public void setCARDAPPROVE(String CARDAPPROVE) {
        RuoYiConfig.CARDAPPROVE = CARDAPPROVE;
    }

    public static String getCardPhoto() {
        return CARD_PHOTO;
    }

    public void setCardPhoto(String cardPhoto) {
        RuoYiConfig.CARD_PHOTO = cardPhoto;
    }

    public static String getDateAccount() {
        return DATE_ACCOUNT;
    }

    public void setDateAccount(String dateAccount) {
        RuoYiConfig.DATE_ACCOUNT = dateAccount;
    }

    public static String getGetipAccount() {
        return GETIP_ACCOUNT;
    }

    public void setGetipAccount(String getipAccount) {
        RuoYiConfig.GETIP_ACCOUNT = getipAccount;
    }

    public static String getGetpythonAccount() {
        return GETPYTHON_ACCOUNT;
    }

    public void setGetpythonAccount(String getpythonAccount) {
        RuoYiConfig.GETPYTHON_ACCOUNT = getpythonAccount;
    }

    public static String getGetAccount() {
        return GET_ACCOUNT;
    }

    public void setGetAccount(String getAccount) {
        RuoYiConfig.GET_ACCOUNT = getAccount;
    }

    public static String getPRINT() {
        return PRINT;
    }

    public void setPRINT(String PRINT) {
        RuoYiConfig.PRINT = PRINT;
    }

    public static String getFileCabinet() {
        return FILE_CABINET;
    }

    public void setFileCabinet(String fileCabinet) {
        RuoYiConfig.FILE_CABINET = fileCabinet;
    }

    public static String getFileCabinetHttp() {
        return FILE_CABINET_HTTP;
    }

    public void setFileCabinetHttp(String fileCabinetHttp) {
        RuoYiConfig.FILE_CABINET_HTTP = fileCabinetHttp;
    }
}
